#pragma once
#include "EpilExpressionCodeBase.h"


class EpilIndexExpressionCode : public EpilExpressionCodeBase
{
	EPIL_CODE_DECL( IndexExpression );

public:
	EpilIndexExpressionCode( const EpilLexLocation & location );
	virtual ~EpilIndexExpressionCode();

	EpilExpressionCodeBase *			GetTableExpression() const							{ return m_tableExpression; }
	void								SetTableExpression( EpilExpressionCodeBase * expr )	{ m_tableExpression = expr; }
	EpilExpressionCodeBase *			GetIndexExpression() const							{ return m_indexExpression; }
	void								SetIndexExpression( EpilExpressionCodeBase * expr )	{ m_indexExpression = expr; }
	
	virtual tstring						ToEpilCode( int indent = 0 ) const;

private:
	EpilExpressionCodeBase *			m_tableExpression;
	EpilExpressionCodeBase *			m_indexExpression;
};